import { createRouter, createWebHistory } from 'vue-router';
import Home from './pages/Home.vue';
import Page1 from './pages/Page1.vue';
import Page2 from './pages/Page2.vue';

// 路由配置
const routes = [
  { 
    path: '/', 
    component: Home,
    name: 'home'
  },
  { 
    path: '/page1', 
    component: Page1,
    name: 'page1'
  },
  { 
    path: '/page2', 
    component: Page2,
    name: 'page2'
  }
];

const router = createRouter({
  history: createWebHistory(window.__POWERED_BY_QIANKUN__ ? '/vue' : '/'),
  routes
});

export default router;